home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmPT_501_EachWindow < prev    next >
Encoding:
Text File  |  1990-03-23  |  2.1 KB  |  96 lines

  1. %case zbuildOrder%
  2.     %if not windname = Clipboard%
  3.         {    z%windname%.p%        %}
  4.     %endif%
  5. %case buildOrder%
  6.     %if not windname = Clipboard%
  7.         {    %windname%.p%        %}
  8.     %endif%
  9. %case sourcefile%
  10.     %if not windname = Clipboard%
  11.         %genfile zWindow z+windname%
  12.         %if not fileExists windname%
  13.             %genfile Window windname%
  14.         %endif%
  15.     %endif%
  16. %case instance%
  17.     %if not windname = Clipboard%
  18.         its%windname%:%        %C%windname%;
  19.         %if not firstWindow%
  20.             %multiWindow%
  21.         %endif%
  22.     %endif%
  23. %case initNil%
  24.     %if not windname = Clipboard%
  25.         its%windname% := nil;
  26.         %if not firstWindow%
  27.             %multiWindow%
  28.         %endif%
  29.     %endif%
  30. %case free%
  31.     %if not windname = Clipboard%
  32.         if its%windname% <> nil then begin
  33.             its%windname%.free;
  34.         end;
  35.     %endif%
  36. %case CloseWind%
  37.     %if not windname = Clipboard%
  38.         %if firstWindow%
  39.             if theWindow = its%windname% then begin
  40.                 inherited CloseWind (theWindow);
  41.         %else%
  42.             end else if theWindow = its%windname% then begin
  43.                 its%windname%.Free;
  44.                 its%windname% := nil;
  45.                 itsWindow := nil;
  46.         %endif%
  47.     %endif%
  48. %case zinterface%
  49.     %if not windname = Clipboard%
  50.         type
  51.             Z%WindName%        = object (CWindow)
  52.                 itsMainPane:    CPane;
  53.                 itsGopher:        CBureaucrat;        {Bureaucrat to make the Gopher}
  54.                                                     {   when Window is activated  }
  55.                 mainScroll:        CScrollPane;
  56.                 mainPanorama:    CPanorama;
  57.  
  58.                 {Panes in this window:}
  59.                 %for each item gen instance%
  60.             
  61.                 {----------}
  62.                 Procedure I%WindName%%    %(aSupervisor:    CDirector);
  63.                 %for each item gen zMake.decl%
  64.  
  65.                 Procedure Activate; override;
  66.                 Procedure DoCommand        (theCommand:    longint); override;
  67.         
  68.             end; {Z%WindName%}
  69.  
  70.     %endif%
  71. %case interface%
  72.     %if not windname = Clipboard%
  73.         type
  74.             C%WindName%        = object (Z%WindName%)
  75.                 %for each item gen instance.override%
  76.                 %for each item gen Make.decl%
  77.  
  78.                 Procedure DoCommand        (theCommand:    longint); override;
  79.         
  80.             end; {C%WindName%}
  81.  
  82.     %endif%
  83. %case create%
  84.     %if not windname = Clipboard%
  85.         New (its%windname%);
  86.         its%windname%.I%windname% (self);
  87.         %if has growBox%
  88.             gDecorator.PlaceNewWindow (its%windname%);
  89.         %endif%
  90.         %if firstWindow%
  91.             itsMainPane := its%windname%.itsMainPane;
  92.             itsWindow := its%windname%;
  93.         %endif%
  94.  
  95.     %endif%
  96.